package org.liuchang.ext;

import java.text.SimpleDateFormat;
import java.util.Calendar;

import org.jdesktop.swingx.JXDatePicker;
import org.jdesktop.swingx.JXMonthView;

/**
 * 自定义日期选择器DatePicker
 * @author 刘倡
 * @date 2015-5-18 下午5:18:29
 */
public class DatePicker extends JXDatePicker{

	public DatePicker(){
		JXMonthView monthView = getMonthView();
		setFormats(new SimpleDateFormat("yyyy-MM-dd"));
		monthView.setFirstDayOfWeek(Calendar.SUNDAY);
	    monthView.setDaysOfTheWeek(
	            new String[]{"日", "一", "二", "三", "四", "五", "六"});
	    monthView.setBoxPaddingX(7);
	}
}
